import { getRequest, postRequest } from '@/api/easyRequest'

export const List = function () {
    return getRequest('/list')
}

export const Edit = function (obj: any) {
    const { id, name, review } = obj
    return postRequest(id ? `/edit?id=${id}` : '/edit', { name, review })
}

export const Del = function (id: number) {
    return getRequest(`/del?id=${id}`)
}
